package com.aneliya.command.server;

import com.aneliya.framework.mvc.Facade;
import com.aneliya.framework.mvc.controller.ICommand;
import com.aneliya.framework.mvc.controller.MVCEvent;
import com.aneliya.proxy.OnlineUsersProxy;

public class LogoutReceivedCommand implements ICommand {

	public void execute(MVCEvent event) {
		try {
			String receivedLogoutUsername = (String) event.data;
			OnlineUsersProxy onlineUsersProxy = 
				(OnlineUsersProxy) Facade.getInstance().retrieveProxy("OnlineUsersProxy");
			onlineUsersProxy.removeOnlineUser(receivedLogoutUsername);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		
	}

}
